package org.springframework.security.oauth2.provider.implicit;

import java.util.concurrent.ConcurrentHashMap;

import org.springframework.security.oauth2.provider.OAuth2Request;
import org.springframework.security.oauth2.provider.TokenRequest;

@SuppressWarnings("deprecation")
@Deprecated
public class InMemoryImplicitGrantService implements ImplicitGrantService {

    protected final ConcurrentHashMap<TokenRequest, OAuth2Request> requestStore = new ConcurrentHashMap<TokenRequest, OAuth2Request>();

    public void store(OAuth2Request originalRequest, TokenRequest tokenRequest) {
        this.requestStore.put(tokenRequest, originalRequest);
    }

    public OAuth2Request remove(TokenRequest tokenRequest) {
        return this.requestStore.remove(tokenRequest);
    }
}
